Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PollyLexicon module #1045

Closed
wants to merge 9 commits into from
Closed

Conversation

danarbaugh
Copy link

@danarbaugh danarbaugh commented Jul 19, 2023

This adds Polly support by removing the only resource the service manages outside of sound files output to local or S3; Lexicons.

Testing

Polly Lexicons were created using the Setup Bash Script included below. AWS Nuke then showed this successful removal within its logs with PollyLexicon included in the configuration.

us-east-1 - PollyLexicon - [Alphabet: "ipa", LanguageCode: "en-US", LastModified: "2023-07-11 15:44:41.906 +0000 UTC", LexemesCount: "2", LexiconArn: "arn:aws:polly:us-east-1:123456789012:lexicon/testlexicon", Name: "testlexicon", Size: "555"] - triggered remove
...
us-east-1 - PollyLexicon - [Alphabet: "ipa", LanguageCode: "en-US", LastModified: "2023-07-11 15:44:41.906 +0000 UTC", LexemesCount: "2", LexiconArn: "arn:aws:polly:us-east-1:123456789012:lexicon/testlexicon", Name: "testlexicon", Size: "555"] - waiting
...
us-east-1 - PollyLexicon - [Alphabet: "ipa", LanguageCode: "en-US", LastModified: "2023-07-11 15:44:41.906 +0000 UTC", LexemesCount: "2", LexiconArn: "arn:aws:polly:us-east-1:123456789012:lexicon/testlexicon", Name: "testlexicon", Size: "555"] - removed

Setup Bash Script

#!/bin/bash

set -ex

# Specify the name and content of the lexicon
LEXICON_NAME="testlexicon"
cat <<EOF > lexicon.xml
<?xml version="1.0" encoding="UTF-8"?>
<lexicon version="1.0" xmlns="http://www.w3.org/2005/01/pronunciation-lexicon"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.w3.org/2005/01/pronunciation-lexicon
    http://www.w3.org/TR/2007/CR-pronunciation-lexicon-20071212/pls.xsd"
    alphabet="ipa"
    xml:lang="en-US">
    <lexeme>
        <grapheme>h3ll0</grapheme>
        <alias>hello</alias>
    </lexeme>
    <lexeme>
        <grapheme>w0rld</grapheme>
        <alias>world</alias>
    </lexeme>
</lexicon>
EOF

# Create the lexicon
echo "Creating the lexicon..."
aws polly put-lexicon \
  --name $LEXICON_NAME \
  --content file://lexicon.xml

echo "Lexicon created with name: $LEXICON_NAME"

# Get information about the lexicon
echo "Getting information about the lexicon..."
aws polly get-lexicon \
  --name $LEXICON_NAME

@danarbaugh danarbaugh requested a review from a team as a code owner July 19, 2023 23:06
@danarbaugh danarbaugh changed the title Add Polly module Add PollyLexicons module Jul 19, 2023
@der-eismann
Copy link
Member

@danarbaugh would you be so kind to implement our suggestions?

@der-eismann der-eismann added the status/waiting-reponse Waiting for the issue author to respond to a question. label Aug 25, 2023
Copy link
Member

@der-eismann der-eismann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one tiny change for the time property, rest looks good 👍

resources/polly-lexicons.go Outdated Show resolved Hide resolved
@danarbaugh danarbaugh changed the title Add PollyLexicons module Add PollyLexicon module Sep 8, 2023
@danarbaugh
Copy link
Author

@der-eismann I believe this should be ready for a merge.

@ekristen
Copy link
Collaborator

This will be implemented via ekristen/aws-nuke#339

If you have a chance, please check it out and let us know if you run into an issues by opening an issue over on the fork.


Please see the copy of the notice from the README about the deprecation of this project. Sven was kind enough to grant me access to help triage and close issues and pull requests that have already been addressed in the actively maintained fork. Some additional information is located in the welcome issue for more information.

Caution

This repository for aws-nuke is no longer being actively maintained. We recommend users to switch to the actively maintained fork of this project at ekristen/aws-nuke.
We appreciate all the support and contributions we've received throughout the life of this project. We believe that the fork will continue to provide the functionality and support that you have come to expect from aws-nuke.
Please note that this deprecation means we will not be addressing issues, accepting pull requests, or making future releases from this repository.
Thank you for your understanding and support.

@ekristen ekristen closed this Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/waiting-reponse Waiting for the issue author to respond to a question.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants